import {TouchableOpacity, View, ViewStyle} from 'react-native';

type Props = {
  children: React.ReactNode;
  onPress?: () => void;
  activeOpacity?: number;
  style?: ViewStyle;
};

export default (props: Props) => {
  const {children, onPress, activeOpacity = 0.7, style} = props;

  return (
    <TouchableOpacity style={style} activeOpacity={activeOpacity} onPress={onPress}>
      {children}
    </TouchableOpacity>
  );
};
